package com.learn.spring;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class FactoryTest {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        Object realFact = (Car) classPathXmlApplicationContext.getBean("realFact");
        System.out.println(realFact);
    }

    public Car MyCar(){
        return new Car();
    }
}
